package com.yuju.order.enums;

/**
 * Created by jiangp on 2017/12/11.
 */
public enum RoomStatusReturnCodeEnum {
    ROOMSTATUS_CURRENT_GET_SUCCESS("yuju-roomstatus-1001", "当前房态获取成功"),
    ROOMSTATUS_CURRENT_GET_FAILURE("yuju-roomstatus-1002", "当前房态获取失败"),
    ROOMSTATUS_FORWARD_GET_SUCCESS("yuju-roomstatus-1003", "远期房态获取成功"),
    ROOMSTATUS_FORWARD_GET_FAILURE("yuju-roomstatus-1004", "远期房态获取失败"),
    ROOMSTATUS_RESERVEROOM_GET_SUCCESS("yuju-roomstatus-1005", "可预订房间获取成功"),
    ROOMSTATUS_RESERVEROOM_GET_FAILURE("yuju-roomstatus-1006", "可预订房间获取失败"),
    ROOMSTATUS_CHECKINROOM_GET_SUCCESS("yuju-roomstatus-1007", "可入住房间获取成功"),
    ROOMSTATUS_CHECKINROOM_GET_FAILURE("yuju-roomstatus-1008", "可入住房间获取失败"),
    ROOMSTATUS_CHECKIN_ROOM_VERIFY_SUCCESS("yuju-roomstatus-1009", "可入住房间验证成功"),
    ROOMSTATUS_CHECKIN_ROOM_VERIFY_FAILURE("yuju-roomstatus-1010", "可入住房间验证失败"),
    ROOMSTATUS_BATCH_DIRTY_SET_SUCCESS("yuju-roomstatus-1011", "批量置脏/净成功"),
    ROOMSTATUS_BATCH_DIRTY_SET_FAILURE("yuju-roomstatus-1012", "批量置脏/净失败"),
    ROOMSTATUS_BATCH_CLEAN_SET_SUCCESS("yuju-roomstatus-1013", "批量置净成功"),
    ROOMSTATUS_BATCH_CLEAN_SET_FAILURE("yuju-roomstatus-1014", "批量置净失败"),
    ROOMSTATUS_BATCH_RECORD_SET_SUCCESS("yuju-roomstatus-1015", "批量维修成功"),
    ROOMSTATUS_BATCH_RECORD_SET_FAILURE("yuju-roomstatus-1016", "批量维修失败"),
    ROOMSTATUS_ROOM_MANAGE_GET_SUCCESS("yuju-roomstatus-1017", "获得房间管理信息成功"),
    ROOMSTATUS_ROOM_MANAGE_GET_FAILURE("yuju-roomstatus-1018", "获得房间管理信息失败");

    private String code;
    private String desc;

    RoomStatusReturnCodeEnum(String code, String desc) {
        this.code = code;
        this.desc = desc;
    }

    public static String getDescByCode(String code) {
        for (RoomStatusReturnCodeEnum enume : RoomStatusReturnCodeEnum.values()) {
            if (enume.getCode().equals(code)) {
                return enume.getDesc();
            }
        }

        return "未知枚举类型";
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getDesc() {
        return desc;
    }

    public void setDesc(String desc) {
        this.desc = desc;
    }
}
